package com.ruoyi.system;

import org.apache.poi.ss.usermodel.DateUtil;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class main {
    public static void main(String[] args) throws ParseException {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        Date d=sdf.parse("2020-12-12 11:22:10");
        Date d1=sdf.parse("2020-12-13 11:22:10");
        long time1=d.getTime();
        long time2=d1.getTime();
        long diff=Math.abs(time2-time1);
        System.out.println(diff/(60*1000)+" 分钟");
    }
}
